import request from '@/utils/request'
import myRequest from '@/utils/myRequest'
// import qs from 'qs'

/**
 * oss
 * url:'/upload/oss'
 * method:GET
 * @returns {*}
 */
export const getUploadOssAPI = () => {
  return request.get('/upload/oss', {
    params: {}
  })
}

/**
 * 文件下载
 * url:'/tool/file/download'
 * method:GET
 * @Header Authorization: 登录接口返回的token
 * @Query params:{
    filePath: ''
 * }
 * @returns {*}
 */
export const fileDownloadAPI = (params) => {
  return myRequest({
    method: 'get',
    url: `/tool/file/download?fileId=${params.fileName}`,
    responseType: 'blob'
  })
}
